﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;


using VideoPlay.PhoneClient.ViewModels;

namespace VideoPlay.PhoneClient.Views
{
    public partial class SearchVideoView : PhoneApplicationPage
    {
        public SearchVideoView()
        {
            InitializeComponent();
        }

        private void Image_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Image image = sender as Image;
            VideoViewModel video = image.DataContext as VideoViewModel;
            video.LikeUnlike();
        }

        private void TextBlock_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            TextBlock textblock = sender as TextBlock;
            VideoViewModel video = textblock.DataContext as VideoViewModel;
            video.Play();
        }

        private void VideoImage_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            TextBlock textblock = sender as TextBlock;
            VideoViewModel video = textblock.DataContext as VideoViewModel;
            video.Play();
        }
    }
}